home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1986 November / 1986-11.d64 / basic examiner (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  50 lines

  1. 100 ifpeek(46)<peek(44)thenpoke45,peek(174):poke46,peek(175):clr
  2. 110 gosub360:sys844:poke808,239:print"[147]"
  3. 120 poke648,160:print"location[194]hex[194]decimal[194]meaning            ":poke648,4
  4. 130 d=256:pokea,fnh(s):pokex,fnl(s):sys828:m=peek(a)+d*peek(x):d=16:print
  5. 140 fori=33to34:v(0)=peek(m):v(1)=peek(m+1):ifv(0)+v(1)=0thennext:goto330
  6. 150 forj=0to1:v=v(j):printm+jtab(9);
  7. 160 printtab(9)chr$(fnc(fnh(v)))chr$(fnc(fnl(v)))tab(14)v(j);:ifj=0thenprint
  8. 170 next:m=m+2:printtab(21)s$(i)v(0)+256*v(1):print:next:m=m-1
  9. 180 m=m+1:v=peek(m):wait653,1,1:ifpeek(203)=63then350
  10. 190 b=(v>127andv<204orv=255)andnotq:ifvthen210
  11. 200 printmtab(9)"00"tab(15)"0[146]"tab(21)"end-of-line":m=m+1:q=v:goto140
  12. 210 printmtab(9)chr$(18*-b)chr$(fnc(fnh(v)))chr$(fnc(fnl(v)))"[146]"tab(15);
  13. 220 printchr$(18*-b)mid$(str$(v),2)"[146]"tab(22);
  14. 230 ifv=32thenprint"  "s$(v):goto180
  15. 240 ifv=34thenq=notq:printchr$(v):goto180
  16. 250 ifv=141andnotbthenprint"[205][146] "s$(v):goto180
  17. 260 ifv=255thenprint" [255]":goto180
  18. 270 ifbthenprint" ";:pokea,v:sys936:print:goto180
  19. 280 ifv>32then310
  20. 290 print""chr$(v+64)"[146] "s$(v);:ifs$(v)=""thenprint"[ctrl-"chr$(v+64)"]";
  21. 300 print:goto180
  22. 310 ifv<128orv>160thenprintchr$(v):goto180
  23. 320 printq$d$chr$(v)q$d$tab(24)s$(v):goto180
  24. 330 m=m-1:print"[145][145]";:pokex,peek(214):sys59903:print:fori=0to2
  25. 340 printm+itab(9)"00"tab(15)"0":next:print"[145]"tab(22)"[159]end of program[155]"
  26. 350 poke198,0:gosub400:print"[147]":goto130
  27. 360 i$="[147]basic examiner":dims$(160):q$=chr$(34):d$=chr$(20):a=780:x=a+1
  28. 370 y=a+2:deffnh(f)=int(f/d):deffnl(f)=f-d*fnh(f):deffnc(f)=f+48-7*(f>9)
  29. 380 fori=5to34:reads$(i):next:fori=129to160:reads$(i):next
  30. 390 fori=828to931:readj:pokei,j:next
  31. 400 f$="":q=0:ifpeek(788)=49thenprinti$:input"program name";f$
  32. 410 f=len(f$):s$="":input"start with line #";s$:s=int(val(s$)):iff=0thenreturn
  33. 420 fori=1tof:poke678+i,asc(mid$(f$,i,1)):next:poke183,f:poke157,128
  34. 430 fori=184to188:readj:pokei,j:next:pokea,0:pokex,1:pokey,8:sys65493
  35. 440 poke44,8:sys42291:poke44,192:ifst=64thenreturn
  36. 450 print:ifst<0thenpokex,5:sys42039
  37. 460 open15,8,15:input#15,a,b$:close15:print""b$
  38. 470 data white,,,lock,unlock,,,,return,lower case,,
  39. 480 data crsr down,rev-on,home,del,,,,,,,,red,crsr right,green,blue,space
  40. 490 data next line at,line number
  41. 500 data orange,,,,f1,f3,f5,f7,f2,f4,f6,f8,shift-return,upper-case,,black
  42. 510 data crsr up,rvs-off,clear,inst,brown,lt.red,gray1,gray2,lt.green,lt.blue
  43. 520 data gray3,purple,crsr left,yellow,cyan,shift-space
  44. 530 data 134,20,133,21,169,1,162,8,32,23,166,165,95,166,96,96,120,169,127,141
  45. 540 data 13,220,169,3,141,21,3,169,120,141,20,3,169,129,141,26,208,169,27,141
  46. 550 data 17,208,88,160,31,185,35,167,153,167,3,136,208,247,96,41,127,76,210
  47. 560 data 255,169,1,141,25,208,162,250,160,199,169,21,44,18,208,16,6,162,57,160
  48. 570 data 197,169,133,142,18,208,140,0,221,141,24,208,173,13,220,41,1,240,3,76
  49. 580 data 49,234,76,188,254,0,0,8,167,2
  50.